package io.adrainty.bolee.security.web;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.framework.commons.utils.ResultDTOUtil;
import io.adrainty.bolee.security.service.ICustomerService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>CustomerController</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description CustomerController
 * @since 2025/8/22 13:31:07
 */

@Tag(name = "CustomerController", description = "客户管理")
@RestController
@RequestMapping("customer")
public class CustomerController {

    @Resource
    private ICustomerService customerService;

    @PostMapping("loginCode/{mobile}")
    public ResultDTO<Boolean> loginCode(@PathVariable("mobile") String mobile) {
        Boolean flag = customerService.sendLoginCode(mobile);
        return ResultDTOUtil.success(flag);
    }

}
